use GovernanceDW_A

var companyProfiles = db.getCollection('GovernanceCompanyProfile').find({})

use GovernanceInputFile

if (companyProfiles) {
    
    db.getCollection('GovernanceFullProfile').drop()
    
    companyProfiles.forEach(function(companyProfile)
    {
        db.GovernanceFullProfile.insert({
                _id: companyProfile._id,
                CompanyName: companyProfile.CompanyName,
                IsFullProfile: companyProfile.FullProfile,
                LastUpdate: new Date(new Date().toUTCString())
            })
    });
}
